Skip to content

Conversation

@oscarandersson8218
Copy link
Collaborator

@oscarandersson8218 oscarandersson8218 commented Nov 26, 2025

For mixed type models we need to be able switch between FP and INT,
meaning quantize and dequantize at runtime. As there are no quantize or
dequantize operators in TOSA, we need to decompose these operators to
TOSA operators. This commit introduces a pass that decomposes q-dq nodes
into more primitive nodes.

This also affects Cortex-M backend as it uses the qdq-folding pass in arm/_passes.

cc @freddan80 @per @zingo @digantdesai

For mixed type models we need to be able switch between FP and INT,
meaning quantize and dequantize online. As there's no quantize or
dequantize operator in TOSA, we need to decompose these operators to
TOSA operators. This commit introduces a pass that decomposes q-dq nodes
into more primitive nodes.

Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: I05d52572a8d614f9f77119f031915ef8bf2a00e3
Enable q-dq decomposition in ArmPassManager.

Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: Idc0d502c2ef1e6081abe55637ba21caad6c847d2
Tag quantized nodes with ArmAnnotationInfo to make q-dq-folding pass
work as expected.

Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: I2e473c1a268a01a9bf31a85802b56d7d2fd9dc38
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 26, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15993

Note: Links to docs will display an error until the docs builds have been completed.

❗ 2 Active SEVs

There are 2 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2025
@oscarandersson8218 oscarandersson8218 added ciflow/trunk release notes: none Do not include this in the release notes partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm labels Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant